package com.acctrue.zentao.enums;

/**
 * @author: 孙炯炯
 * @since: 2024/9/5
 **/
public enum BugStatusEnum {
    /**
     * bug状态
     */
    active("active", "激活"),
    resolved("resolved", "已解决"),
    closed("closed", "已关闭"),
    NULL("null", "空"),
    ;
    private final String value;
    private final String name;

    public String getValue() {
        return value;
    }

    public String getName() {
        return name;
    }

    BugStatusEnum(String value, String name) {
        this.value = value;
        this.name = name;
    }

    public static String getNameByValue(String value) {
        for (BugStatusEnum e : BugStatusEnum.values()) {
            if (e.getValue().equals(value)) {
                return e.name;
            }
        }
        return "";
    }

    public static String getCommitPrefix(String type) {
        return "refactor:";
    }
}
